<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>图书管理系统-首页</title>
<meta name="keywords"
	content="Book Store Template, Free CSS Template, CSS Website Layout, CSS, HTML" />
<meta name="description"
	content="Book Store Template, Free CSS Template, Download CSS Website" />
<link href="templatemo_style.css" rel="stylesheet" type="text/css" /><link href="templatemo_style.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery.min.js?v=2.1.4"></script>
<script type="" src="js/plugins/layer/layer.min.js"></script>
</head>
<body> 
<script >
	function addfeekbock(){
		layer.open({
			  type: 1,
			  skin: 'layui-layer-demo', //样式类名
			  closeBtn: 0, //不显示关闭按钮
			  anim: 2,
			  shadeClose: true, //开启遮罩关闭
			  content: '<div style="width: 400px;height: 400px;"><form action="UserInfoServlet?opr=addfeedback" method="post"><table><tr><td>请输入反馈意见:</td><td><textarea rows="20" cols="32" name="msg">请输入反馈内容。。。</textarea></td></tr><tr><td></td><td ><input type="submit" value="提交"/></td></tr></table></form><div>'
			});
	}
</script>

	<div id="templatemo_container">
		<div id="templatemo_menu">
			<ul>
				<c:if test="${user!=null }"> 
				<li><a href="#" class="current">欢迎进入图书管理系统:</a></li> 
					<li><a href="#" class="current">${user.user_name}</a></li>
					<!-- <li><a href="#" class="current">查看个人书评</a></li> -->
					<li><a href="UserInfoServlet?opr=outlog" class="current">&nbsp;&nbsp;&nbsp;登录注销</a></li>
				</c:if>
				<c:if test="${user==null }"> 
				<li><a href="#" class="current">欢迎进入图书管理系统:</a></li> 
					<li><a href="login.jsp" class="current">游客访问,请登录或注册...</a></li>
				</c:if>
				<li><a>有效访问次数:${visits }</a></li>
				<li><a onclick="addfeekbock()">反馈意见</a></li>
			</ul>
		</div>
		<!-- end of menu -->



		<div id="templatemo_content">

			<div id="templatemo_content_left">
				<div class="templatemo_content_left_section">
					<h1>书籍列表</h1>
					<ul>
						<c:forEach items="${books }" var="b">
							<li><a  href="UserInfoServlet?opr=detailsbooks&detailsbooksbookid=${b.id }">${b.book_number }</a></li>
						</c:forEach>
					</ul>
				</div><!-- 
					<p>
					<input type="text" /><button >搜索</button>
					</p> -->
			</div>
			<!-- end of content left -->

			<div id="templatemo_content_right"> 
		 
 
				<c:forEach items="${books }" var="book" varStatus="status">
					<c:if test="${status.index%2==0 }">

						<div class="cleaner_with_height">&nbsp;</div>
					</c:if>
					<c:if test="${status.index%2==0 }">

						<div class="cleaner_with_width">&nbsp;</div>
					</c:if>
					<div class="templatemo_product_box">
						<h1>
							${book.book_number } <span>(${book.book_user_name })</span>
						</h1>
						<img src="${book.book_imgurl }" alt="image" width="100px;"
							height="150px;" />
						<div class="product_info">
							<p style="width:180px;height:70px;overflow:hidden;">
								${book.book_dateails }</p>
							<div class="detail_button">
								<a href="UserInfoServlet?opr=detailsbooks&detailsbooksbookid=${book.id }">查看详情</a>
							</div>
						</div>
						<div class="cleaner">&nbsp;</div>
					</div>
				</c:forEach>
			</div>
			<!-- end of content right -->

			<div class="cleaner_with_height">&nbsp;</div>
		</div>
		<!-- end of content -->
	</div>

</body>
</html>